﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DataAccessLayer;
using Entities;

namespace BusinessLogicLayer
{
    public class HocVienBLL
    {
        private HocVienDAL dal;

        public HocVienBLL()
        {
            try
            {
                dal = new HocVienDAL();
            }
            catch { throw; }
        }

        public List<HocVienEntity> getAll()
        {
            try
            {
                return dal.getAll();
            }
            catch { throw; }
        }

        public HocVienEntity getById(string _id)
        {
            try
            {
                return dal.getById(_id);
            }
            catch { throw; }
        }

        public List<HocVienEntity> getByKhoaHocId(int _id)
        {
            try
            {
                return dal.getByKhoaHocId(_id);
            }
            catch { throw; }
        }

        public List<HocVienEntity> getByLopHocId(int _id)
        {
            try
            {
                return dal.getByLopHocId(_id);
            }
            catch { throw; }
        }

        public int addHocVien(HocVienEntity _obj)
        {
            try
            {
                return dal.addHocVien(_obj);
            }
            catch { throw; }
        }

        public int deleteHocVien(string _id)
        {
            try
            {
                return dal.deleteHocVien(_id);
            }
            catch { throw; }
        }

        public int updateHocVien(HocVienEntity _obj)
        {
            try
            {
                return dal.updateHocVien(_obj);
            }
            catch { throw; }
        }
    }
}
